<template>
<div class="swiper">
  <el-carousel :interval="6000" trigger="click">
    <el-carousel-item v-for="(item, index) in imageList" :key="index">
      <a href="#" class="swiper-item">
        <div class="description">
          <span>我的青春恋爱物语果然有问题 完结</span>
        </div>
        <el-image :src="item.src" fit="cover"></el-image>
      </a>
    </el-carousel-item>
  </el-carousel>
</div>
</template>
<script>
export default {
  name: "yukinoSwiper",
  data() {
    return {
      imageList: [
        {src: require('@/assets/pics/yukino_trend1.jpg')},
        {src: require('@/assets/pics/yukino_trend2.jpg')},
        {src: require('@/assets/pics/yukino_trend3.jpg')},
        {src: require('@/assets/pics/yukino_trend4.jpg')},
        {src: require('@/assets/pics/yukino_trend5.jpg')},
        {src: require('@/assets/pics/yukino_trend6.jpg')},
      ]
    }
  },
};
</script>
<style scoped>
.el-carousel {
  width: 600px;
  height: 300px;
  margin: 20px auto;
}
.el-carousel__item {
  border-radius: 6px;
}
.el-carousel__item .el-image {
  width: 100%;
  height: 100%;
  z-index: 1;
}
.swiper-item span{
  color: #000;
}
.swiper-item .description{
  z-index: 2;
  width: 100%;
  position: absolute;
  /* color: #84c4e2; */
  background: #f1f1f1;
  top: 0;
  text-align: center;
  padding: 5px;
  font-weight: 600;
}
</style>